package interact

import (
	"encoding/json"
	"log"
)

func parse(interactStr string) {
	var p map[string]json.RawMessage
	json.Unmarshal([]byte(interactStr), &p)
	for k, v := range p {
		if k == "globalSetting" {
			var g globalSetting
			json.Unmarshal(v, &g)
			mixSetting(g)
		} else {
			var p [][]questionSetting
			json.Unmarshal(v, &p)
			log.Println(p)
		}
	}
}
